#include<iostream>
using namespace std;

void sort(int *p, int  *q) {

	int tmp;
	if (*p > *q) {
		tmp = *p;

		*p = *q;
		*q = tmp;
	}
}

int main()

{

	int a, b;
	cin >> a >> b;
	sort(&a, &b);
	cout << a << " " << b << endl;
	return 0;
}
